#include <my_head.h>
int main(int argc, char const *argv[])
{
    pid_t pid = fork();
    if(-1 == pid){
        ERR_LOG("fork error");
    }else if(0<pid){
        printf("这是父进程 pid = [%d]  ppid = [%d]  childpid = [%d]\n",\
        getpid(),getppid(),pid);
    }else if(0 == pid){
        printf("这是子进程 pid = [%d]  ppid = [%d]\n",getpid(),getppid());
    }
    return 0;
}
